<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>分配权限</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/js/ztree/zTreeStyle/zTreeStyle.css}"/>
</head>
<body class="no-skin">
<div th:replace="common/top"></div>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"></div>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"></div>
            <div class="page-content">
                <div th:replace="common/skin"></div>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <form class="form-horizontal" action="" name="form"
                              th:action="@{/sys/sysRole/saveRoleResources}" th:method="post">
                            <input type="hidden" name="roleId" id="roleId" th:value="${roleId}"/>
                            <input type="hidden" name="resourcesId" id="resourcesId"/>
                            <input type="hidden" name="resourcesList" id="resourcesList" th:value="${resourcesList}"/>
                            <h3 class="header smaller lighter blue"><i class="fa fa-plus" aria-hidden="true"></i>分配权限
                            </h3>
                            <div class="row-fluid">
                                <div class="text-center span12">
                                    <ul id="treeDemo" class="ztree"></ul>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="text-center span12">
                                    <button shiro:hasPermission="/sys/sysRole/resources" class="btn btn-primary"
                                            type="submit"><i class="fa fa-floppy-o" aria-hidden="true"></i>提交
                                    </button>
                                    <button shiro:hasPermission="/sys/sysRole/resources" class="btn btn-danger"
                                            type="reset"><i class="fa fa-times" aria-hidden="true"></i>取消
                                    </button>
                                    <a shiro:hasPermission="/sys/sysRole/getAll" class="btn" href=""
                                       th:href="@{/sys/sysRole/getAll}"><i class="fa fa-reply" aria-hidden="true"></i>返回</a>
                                </div>
                            </div>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"></div>
</div><!-- /.main-container -->
<div th:replace="common/buttom"></div>
<script type="text/javascript" th:src="@{/js/ztree/jquery.ztree.core-3.5.js}"></script>
<script type="text/javascript" th:src="@{/js/ztree/jquery.ztree.excheck-3.5.js}"></script>
<script type="text/javascript" th:src="@{/js/page/resources.js}"></script>
</body>
</html>
